<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="win10 powerShell安装chocolatey 时候会禁止运行脚本导致无法安装。 加一句 1set-executionpolicy remotesigned  就可以信任脚本 之后再粘贴 123Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtoc">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo">
<meta property="og:url" content="http://yoursite.com/2020/07/13/%E5%AE%89%E8%A3%85chocolatey/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="win10 powerShell安装chocolatey 时候会禁止运行脚本导致无法安装。 加一句 1set-executionpolicy remotesigned  就可以信任脚本 之后再粘贴 123Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtoc">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2020-07-13T00:57:24.466Z">
<meta property="article:modified_time" content="2020-05-08T06:36:05.000Z">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  
<link rel="stylesheet" href="/css/style.css">

<meta name="generator" content="Hexo 5.0.2"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-安装chocolatey" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2020/07/13/%E5%AE%89%E8%A3%85chocolatey/" class="article-date">
  <time datetime="2020-07-13T00:57:24.466Z" itemprop="datePublished">2020-07-13</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>win10 powerShell安装chocolatey 时候会禁止运行脚本导致无法安装。</p>
<p>加一句</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="string">set-executionpolicy</span> <span class="string">remotesigned</span></span><br></pre></td></tr></table></figure>

<p>就可以信任脚本</p>
<p>之后再粘贴</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProt</span><br><span class="line">ocol &#x3D; [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadStri</span><br><span class="line">ng(&#39;https:&#x2F;&#x2F;chocolatey.org&#x2F;install.ps1&#39;))</span><br></pre></td></tr></table></figure>

<p>就可以等待安装。</p>
<p>安装完后输入</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">choco -?</span><br></pre></td></tr></table></figure>

<p>检查</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2020/07/13/%E5%AE%89%E8%A3%85chocolatey/" data-id="ckdtkxkx00008z0uj90i8er9y" class="article-share-link">Share</a>
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2020/07/13/Android%20%20drawable%E4%B8%AD%E8%BE%B9%E6%A1%86%E6%A0%B7%E5%BC%8F/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          (no title)
        
      </div>
    </a>
  
  
    <a href="/2020/07/13/Android%20%E7%8A%B6%E6%80%81%E6%A0%8F%E9%80%8F%E6%98%8E%20%E4%B8%94%E5%8F%AF%E4%BB%A5%E7%99%BD%E5%BA%95%E9%BB%91%E5%AD%97/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title"></div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/08/">August 2020</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/07/">July 2020</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2020/08/14/MY-First-Post/">MY First Post</a>
          </li>
        
          <li>
            <a href="/2020/08/14/hello-world/">Hello World</a>
          </li>
        
          <li>
            <a href="/2020/07/31/RecyclerView%20%E6%92%91%E6%BB%A1/">(no title)</a>
          </li>
        
          <li>
            <a href="/2020/07/31/RecyclerView%20Adapter/">(no title)</a>
          </li>
        
          <li>
            <a href="/2020/07/31/Android%E5%9C%A8TextView%E4%B8%AD%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86%E6%96%87%E5%AD%97%E5%8F%AF%E7%82%B9%E5%87%BB/">(no title)</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2020 John Doe<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">

  
<script src="/fancybox/jquery.fancybox.pack.js"></script>




<script src="/js/script.js"></script>




  </div>
</body>
</html>